package main
import (
	"log"
	"os"
	"io"
)
func main() {
	err := os.Create("example.txt")
	if err != nil {
		log.Fatal(err)
	}
	defer file.Close()

	_, err = io.WriteString(file, "Hello,world!\n")

	if err != nil {
		log.Fatal(err)
	}
}
